<div class="box-body">
    <form class="layui-form" action="{:url('/wms/warehouse/save')}" method="post">
        <div class="layui-form-item">
            <label class="layui-form-label xrequired">仓库名称</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" placeholder="仓库名称"  name="name" {if isset($warehouse)}value="{$warehouse.name}"{/if}  class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">仓库代码</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" placeholder="仓库代码"  name="code" {if isset($warehouse)}value="{$warehouse.code}"{/if} class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">仓库面积</label>
            <div class="layui-input-block">
                <input type="number" autocomplete="off" placeholder="仓库面积"  name="area" {if isset($warehouse)}value="{$warehouse.area}"{/if} class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">联系人</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" placeholder="仓库联系人"  name="contacts" {if isset($warehouse)}value="{$warehouse.contacts}"{/if} class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">电话</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" placeholder="仓库联系人电话"  name="phone" {if isset($warehouse)}value="{$warehouse.phone}"{/if} class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">地址</label>
            <div class="layui-input-block">
                <input type="text" autocomplete="off" placeholder="仓库地址"  name="address" {if isset($warehouse)}value="{$warehouse.address}"{/if} class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">默认仓库</label>
            <div class="layui-input-block">
                <input type="checkbox" name="is_default" value="1" {if isset($warehouse) && $warehouse.is_default}checked{/if} lay-skin="switch">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">状态</label>
            <div class="layui-input-block">
                <input type="checkbox" name="status" value="1" {if !isset($warehouse) || (isset($warehouse) && $warehouse.status)}checked{/if} lay-skin="switch">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">虚拟仓</label>
            <div class="layui-input-block">
                <input type="checkbox" name="is_virtual" value="1" {if isset($warehouse) && $warehouse.is_virtual}checked{/if} lay-skin="switch">
            </div>
        </div>
        {if isset($warehouse)}
        <input type="hidden" name="warehouse_id" value="{$warehouse.warehouse_id}">
        {/if}
    </form>
</div>